/**
 * 
 */
package com.appcheck.recording.action.impl;

import org.json.JSONException;
import org.json.JSONObject;

import com.appcheck.recording.action.AbstractAction;
import com.appcheck.recording.action.ActionConvert;
import com.appcheck.recording.handler.AbstractActionHandler;
import com.appcheck.recording.plugin.AbstractActionConverter;

public final class DateChangedAction implements AbstractAction, ActionConvert {

	private String resourceName;
	private int resourceId;
	private int index = -1;
	private int year;
	private int month;
	private int dayOfMonth;
	
	public final String toString(){
	    JSONObject localJSONObject = new JSONObject();
	    try{
	      localJSONObject.put("class", "DateChangedAction");
	      localJSONObject.put("resourceName", this.resourceName);
	      localJSONObject.put("resourceId", this.resourceId);
	      localJSONObject.put("index", this.index);
	      localJSONObject.put("year", this.year);
	      localJSONObject.put("month", this.month);
	      localJSONObject.put("dayOfMonth", this.dayOfMonth);
	    }
	    catch (JSONException localJSONException) {}
	    return localJSONObject.toString();
	}
	
	
	
	public final int getResourceId() {
		return resourceId;
	}



	public final void setResourceId(int resourceId) {
		this.resourceId = resourceId;
	}



	public final int getIndex() {
		return index;
	}



	public final int getYear() {
		return year;
	}



	public final int getMonth() {
		return month;
	}



	public final int getDayOfMonth() {
		return dayOfMonth;
	}



	@Override
	public boolean handle(AbstractActionHandler param) {
		return param.visit(this);
	}



	public final String getResourceName() {
		return resourceName;
	}



	public final void setResourceName(String id) {
		this.resourceName = id;
	}



	public final void setIndex(int index) {
		this.index = index;
	}



	public final void setYear(int year) {
		this.year = year;
	}



	public final void setMonth(int month) {
		this.month = month;
	}



	public final void setDayOfMonth(int dayOfMonth) {
		this.dayOfMonth = dayOfMonth;
	}



	@Override
	public void toTestCode(AbstractActionConverter actionConverter) {
		// TODO Auto-generated method stub
	}
	

}
